package cn.tedu.person.mapper;

import cn.tedu.person.pojo.entity.Admin;
import cn.tedu.person.pojo.vo.AdminIndexVO;
import cn.tedu.person.pojo.vo.AdminLoginInfoVO;
import cn.tedu.person.pojo.vo.AdminStandardVO;;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface AdminMapper {

    int insert(Admin admin);

    int deleteById(Long id);

    List<AdminIndexVO> list();

    int update(Admin admin);

    AdminStandardVO getStandardById(Long id);

    int countByNameAndNotId(@Param("id") Long id, @Param("name") String name);

    int countByName(String name);

    AdminLoginInfoVO getLoginInfoByUsername(String name);

}
